#include <utility>
#include <iostream>
// #include <format>

using namespace std;

int main()
{
	int a{11};
	int b{22};

	printf("Before exchange(): a = %d, b = %d\n", a, b);

	int returnedValue{std::exchange(a, b)};

	printf("After exchange():  a = %d, b = %d\n", a, b);
	printf("exchange() returned: %d\n", returnedValue);
}